{% extends 'layout/basic.html' %}
{% load static %}
{% block title %} 订单 {% endblock %}

{% block content %}
    {#    <table class="table">#}
    {#        <thead>#}
    {#        <tr>#}
    {#            <th>编号</th>#}
    {#            <th>房间类型</th>#}
    {#            <th>房间名称</th>#}
    {#            <th>房间状态</th>#}
    {##}
    {##}
    {#        </tr>#}
    {#        </thead>#}
    {#        <tbody>#}
    {#        {% for i in room_all %}#}
    {#            <tr>#}
    {#                <th scope="row">{{ i.id }}</th>#}
    {#                <td>{{ i.room_name }}</td>#}
    {#                <td>{% if i.room_type == 1 %}#}
    {#                    内舱房#}
    {#                {% elif i.room_type == 2 %}#}
    {#                    海景房#}
    {#                {% elif i.room_type == 3 %}#}
    {#                    阳台房#}
    {#                {% elif i.room_type == 4 %}#}
    {#                    套房#}
    {#                {% endif %}#}
    {#                </td>#}
    {#                <td>{% if i.check_in_state == 1 %}#}
    {#                    空闲#}
    {#                {% elif i.check_in_state == 2 %}#}
    {#                    预定#}
    {#                {% elif i.check_in_state == 3 %}#}
    {#                    已入住#}
    {#                {% endif %}#}
    {#                </td>#}
    {#            </tr>#}
    {#        {% endfor %}#}
    {##}
    {##}
    {#        </tbody>#}
    {#    </table>#}
{#    <div class="bs-example" data-example-id="thumbnails-with-custom-content">#}



            <div class="row" style="white-space: nowrap">
            {% for i in room_all %}
                <div class="col-sm-4 col-md-2">

                    <div class="thumbnail">

                        <div class="caption">

                            <p>
                                {% if i.room_type == 1 %}
                                    内舱房
                                {% elif i.room_type == 2 %}
                                    海景房
                                {% elif i.room_type == 3 %}
                                    阳台房
                                {% elif i.room_type == 4 %}
                                    套房
                                {% endif %}
                            </p>
                            <h3>{{ i.room_name }}</h3>
                            <p>
                                {% if i.check_in_state == 1 %}
                                    空闲
                                {% elif i.check_in_state == 2 %}
                                    已预定
                                {% elif i.check_in_state == 3 %}
                                    已入住
                                {% endif %}
                            </p>
                            <p>
                                {% if i.check_in_state == 2 or i.check_in_state == 3 %}
                                    {% else %}
                                    <button><a href="{% url 'reserves' id=i.id cid=i.curise_id %}" >预订</a></button>
                                    </p>
                        {% endif %}
                        </div>

                    </div>

                </div>
            {% endfor %}
            </div>

{#    </div>#}
{% endblock %}